package com.rg1906.dao.Impl;

import java.sql.SQLException;

import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;

import com.rg1906.utils.DataSourceC3P0ThreadLocal;

public class UpdateUserDaoImpl {
	DataSource dataSource = DataSourceC3P0ThreadLocal.getDataSource();
	QueryRunner qr = new QueryRunner(dataSource);
	public int updateUser(String loginPassword, String id) throws SQLException {
		String sql="update t_user set loginPassword=? where id=?";
		Object[] par= {loginPassword,id};
		int i = qr.update(sql,par);
		return i;
	}
}
